<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>使用第三方组件来使用表单控件</title>
    <style>
      @import url('//unpkg.com/element-ui@2.15.14/lib/theme-chalk/index.css');
    </style>
  </head>
  <body>
    <script src="//unpkg.com/vue@2/dist/vue.js"></script>
    <script src="//unpkg.com/element-ui@2.15.14/lib/index.js"></script>
    <div id="app">
      <el-switch v-model="value" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
    </div>
    <script>
      var Main = {
        data() {
          return {
            value: true
          }
        }
      }
      var Ctor = Vue.extend(Main)
      new Ctor().$mount('#app')
    </script>
  </body>
</html>
